﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;


namespace SharpSphinx.Linguist.Acoustic
{

    /// <summary>
    ///  Represents  the context for a unit
    /// </summary>
    public class Context : ISerializable
    {

        /// <summary>
        /// Represents an empty context
        /// </summary>
        public static Context Empty_Context = new Context(); 

        /// <summary>
        /// No instantiations allowed
        /// </summary>
        protected Context()
        {}


    

        /// <summary>
        /// Not Imp
        /// Checks to see if there is a partial match with the given context. For a simple context such as this we always match.
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        public bool IsPartialMatch(Context context)
        {
            return true;
        }


        public override string ToString()
        {
            return "";
        }


        public override bool Equals(object obj)
        {
            if (this == obj)
            {
                return true;
            }
            else if (obj is Context)
            {
                Context OtherContext = (Context)obj;
                return ToString().Equals(OtherContext.ToString());
            }
            else
            {
                return false;
            }
        }


        public override int GetHashCode()
        {
            return ToString().GetHashCode();
        }

    }
}
